java
sql
html
php
c
python
xcode
ruby-on-rails
mysql
visual-studio
eclipse
flash
html5
algorithm
tsql
delphi
mvc
asp
postgresql
dom
The best way to do this is with a script. CSV import scripts are usually written in a scripting language such as python, ruby, or php.
You just need the importer for the second CSV to perform updates on the records created in the first CSV, so the script will really only be 5-10 lines. If you provide a sample record from each CSV, I'd be happy to write one for you.
Edit: Here's a python script to combine the files, adding a semicolon between lines from file1 and lines from file2. This essentially does what Linux's paste command would do.
paste
lines1 = open('file1.txt').readlines() lines2 = open('file2.txt').readlines() outfile = open('outfile.txt', 'w') if len(lines1) != len(lines2): raise Exception("Files need to be the same length, but file1 is %s lines long and file2 is %s lines long" % (len(lines1), len(lines2))); for i in range(len(lines1)): combined = lines1[i].strip() + ";" + lines2[i].strip() + "\n" outfile.write(combined)
You can run it by saving it as combine.py and typing python combine.py. The folder you place it in should contain file1.txt, file2.txt, and outfile.txt.
combine.py
python combine.py
file1.txt
file2.txt
outfile.txt
Combine two CSV into one.
If you are in linux platform, use the paste command to join two or more files.
PASTE(1) NAME paste - merge lines of files SYNOPSIS paste [OPTION]... [FILE]... DESCRIPTION Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -d, --delimiters=LIST reuse characters from LIST instead of TABs -s, --serial paste one file at a time instead of in parallel --help display this help and exit --version output version information and exit
such as
paste file1.csv file2.csv > file3.csv
I would look at Perl and the Text::CSV module. One issue you'll need to think about is whether the data is in the same order in the two files.